/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.form.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.hera.base.domain.BaseDomain;
import com.hera.process.config.domain.ParameterDetail;

/**
 *
 * @author cmontes
 */
@Entity
@Table(name = "DYNAFORM_FIELD")
public class DynaformField  extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected DynaformFieldPK dynaformFieldPK;
    @JoinColumn(name = "ID_FIELD", referencedColumnName = "ID_FIELD", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private FormField field;
    @JoinColumn(name = "ID_DYNAFORM", referencedColumnName = "ID_DYNAFORM", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Dynaform dynaform;
    @Column(name = "ID_TYPE")
    private Long idType;
    private Integer length;
    
    @Column(name = "TOP")
    private Integer top;
    @Column(name = "LEFT")
    private Integer left;
    /*@Column(name = "ID_MODE")
    private Long idMode;*/
    @ManyToOne
    @JoinColumn(name="ID_MODE")
    private ParameterDetail mode;
    @Column(name = "NUMBER_ROWS")
    private Integer numberRows;
    @Column(name = "NUMBER_COLS")
    private Integer numberCols;
    @Column(name = "SEQUENCE")
    private Integer sequence;
    @Column(name = "ICONIFIABLE")
    private Boolean iconifiable;
    @Column(name = "DEDIT")
    private Boolean dedit;
    @Column(name = "DDELETE")
    private Boolean ddelete;
    @Column(name = "DVIEW")
    private Boolean dview;
    @Column(name = "DNEW")
    private Boolean dnew;
    
    @Transient
    private Object formValue;
    
    public DynaformFieldPK getDynaformFieldPK() {
		return dynaformFieldPK;
	}

	public void setDynaformFieldPK(DynaformFieldPK dynaformFieldPK) {
		this.dynaformFieldPK = dynaformFieldPK;
	}

	public FormField getField() {
		return field;
	}

	public void setField(FormField field) {
		this.field = field;
	}

	public Dynaform getDynaform() {
		return dynaform;
	}

	public void setDynaform(Dynaform dynaform) {
		this.dynaform = dynaform;
	}

	@Override
    public String toString() {
        return "com.hera.process.data.domain2.DynaformStage[ dynaformFieldPK=" + dynaformFieldPK + " ]";
    }

	public Integer getTop() {
		return top;
	}

	public Integer getLeft() {
		return left;
	}

	public void setTop(Integer top) {
		this.top = top;
	}

	public void setLeft(Integer left) {
		this.left = left;
	}

	public Long getIdType() {
		return idType;
	}

	public Integer getLength() {
		return length;
	}

	public void setIdType(Long idType) {
		this.idType = idType;
	}

	public void setLength(Integer length) {
		this.length = length;
	}

	public Object getFormValue() {
		return formValue;
	}

	public void setFormValue(Object formValue) {
		this.formValue = formValue;
	}

	public ParameterDetail getMode() {
		return mode;
	}

	public void setMode(ParameterDetail mode) {
		this.mode = mode;
	}

	public Integer getNumberRows() {
		return numberRows;
	}

	public void setNumberRows(Integer numberRows) {
		this.numberRows = numberRows;
	}

	public Integer getNumberCols() {
		return numberCols;
	}

	public void setNumberCols(Integer numberCols) {
		this.numberCols = numberCols;
	}

	public Integer getSequence() {
		return sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}

	public Boolean getIconifiable() {
		return iconifiable;
	}

	public void setIconifiable(Boolean iconifiable) {
		this.iconifiable = iconifiable;
	}

	public Boolean getDedit() {
		return dedit;
	}

	public void setDedit(Boolean dedit) {
		this.dedit = dedit;
	}

	public Boolean getDdelete() {
		return ddelete;
	}

	public void setDdelete(Boolean ddelete) {
		this.ddelete = ddelete;
	}

	public Boolean getDview() {
		return dview;
	}

	public void setDview(Boolean dview) {
		this.dview = dview;
	}

	public Boolean getDnew() {
		return dnew;
	}

	public void setDnew(Boolean dnew) {
		this.dnew = dnew;
	}
	
}
